package com.outsource.framework.model.repository;

import java.util.List;

import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;
import org.springframework.data.repository.query.Param;

import com.outsource.framework.domain.Tinfosection;

public interface TinfosectionRepository extends CrudRepository<Tinfosection, Integer>, JpaSpecificationExecutor<Tinfosection>{

	@Query(value="select * from t_info_section where id = :id",nativeQuery = true)
	Tinfosection getById(@Param("id")Integer id);
	@Query(value="select id,name,type from t_info_section where type = :type and haschildren = 0 and status = 1",nativeQuery = true)
	List<Object[]> findByAllapps(@Param("type")String type);
}
